Fix mnemonic activation for some printer option widgets
authorMatthias Clasen <mclasen@redhat.com>
Sat, 1 Sep 2012 02:44:45 +0000 (22:44 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 1 Sep 2012 02:50:28 +0000 (22:50 -0400)
The file type radio group has a mnemonic on its label, but
activating it did not work, since GtkPrinterOptionWidget did
not know to forward the activation to one of the buttons.

gtk/gtkprinteroptionwidget.c

index a62fd0c6210330f8a8c531b240b04310f6a31130..44c54adf7c5f265fb7f8bc9abd4191847cecbd64 100644 (file)
@@ -826,11 +826,16 @@ construct_widgets (GtkPrinterOptionWidget *widget)
       gtk_widget_show (priv->box);
       gtk_box_pack_start (GTK_BOX (widget), priv->box, TRUE, TRUE, 0);
       for (i = 0; i < source->num_choices; i++)
-       group = alternative_append (priv->box,
-                                    source->choices_display[i],
-                                    source->choices[i],
-                                    widget,
-                                    group);
+        {
+         group = alternative_append (priv->box,
+                                      source->choices_display[i],
+                                      source->choices[i],
+                                      widget,
+                                      group);
+          /* for mnemonic activation */
+          if (i == 0)
+            priv->button = group->data;
+        }
 
       if (source->display_text)
        {